package com.itheima.stock.mapper;

import com.itheima.stock.pojo.SysRole;
import com.itheima.stock.pojo.SysUser;
import com.itheima.stock.vo.req.PutUserRole;
import com.itheima.stock.vo.req.TianJiaReq;
import com.itheima.stock.vo.resp.FindUser;
import com.itheima.stock.vo.resp.TianJiaRes;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 15595
 * @description 针对表【sys_user(用户表)】的数据库操作Mapper
 * @createDate 2022-02-12 19:49:11
 * @Entity com.itheima.stock.pojo.SysUser
 */
public interface SysUserMapper {

    //更改用户信息
    int updateUser(FindUser findUser);

    //删除用户1
    int deleteUser(@Param("ids") List<String> ids);

    //删除用户2
    int deleteUser2(@Param("ids") List<String> ids);

    //更新用户权限
    int upUserRole(PutUserRole putUserRole);

    //添加用户
    int addUser(TianJiaReq tianJiaReq);

    //用户查询权限
    List<SysRole> findRole(String id);


    //分页查询用户详细
    List<SysUser> findAll();


    //根据用户名查询用户
    SysUser findByUserName(@Param("username") String username);

    //根据id删除某个用户
    int deleteByPrimaryKey(String id);

    //添加用户
    int insert(SysUser record);





    //选择性的添加某个用户的某些信息
    int insertSelective(SysUser record);

    //根据id查询某个用户
    SysUser selectByPrimaryKey(String id);

    //根据id选择性的修改某个用户的某些信息
    int updateByPrimaryKeySelective(SysUser record);

    //根据id修改某个用户的全部信息
    int updateByPrimaryKey(SysUser record);

}
